#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File  : user_ctrl.py
# @Author: season
# @Date  : 2018/8/23
# @Desc  : 用户信息

from tornado.web import app_log

import config
from common import base
from common.exceptions import APIException

mdb = config.mdb


class UserInfo(base.AppBaseHandler):
    def get(self):
        app_log.info("请求用户信息")
        try:
            result = mdb.salon_info.find_one()
        except Exception as e:
            print(e)
            raise APIException(msg="定制的错误")
        print(result)
        return self.finish(base.rtjson(result=result))
